<template>
	<view class="cxy-card" @click="$emit('click')">
		<view class="cxy-card-header">
			<view class="cxy-header">
				<img v-show="thum" :src="thum" alt="">
				<p>{{title}}</p>
			</view>
			<p>{{tips}}</p>
		</view>
		<view class="cxy-card-body">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name:"tabCard",
		props: {
			title: {
				type: String,
				default: ''
			},
			tips: {
				type: String,
				default: ''
			},
			thum: {
				type: String,
				default: ''
			}
		},
	}
</script>

<style lang="scss" scoped>
	.cxy-card {
		display: flex;
		flex-direction: column;
		flex-grow: 1;
		border: 1px solid #c8c7cc;
		border-radius: 10rpx;
		margin: 30rpx;
		.cxy-card-header {
			display: flex;
			flex-direction: row;
			border-bottom: 1px solid #c8c7cc;
			.cxy-header {
				flex-grow: 1;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: flex-start;
				padding: 20rpx;
				img {
					width: 45rpx;
					height: 45rpx;
				}
			}
			p {
				color: #8C8C8C
			}
		}
		.cxy-card-body {
			padding: 30rpx;
		}
	}
</style>
